﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AnimationEditor
{
	public class Frame
	{
		string name = "DEFAULT";

		Rectangle frameRect = new Rectangle();

		Point anchorPoint = new Point();

		List<Point> specialPoints = new List<Point>();

		List<Rectangle> collisionRects = new List<Rectangle>();

		string eventstring = "";

		double speed = .25f;

		public string Name
		{
			get { return name; }
			set { name = value; }
		}

		public double Speed
		{
			get { return speed; }
			set { speed = value; }
		}

		public Rectangle FrameRect
		{
			get { return frameRect; }
			set { frameRect = value; }
		}

		public Point AnchorPoint
		{
			get { return anchorPoint; }
			set { anchorPoint = value; }
		}

		public List<Point> SpecialPoints
		{
			get { return specialPoints; }
			set { specialPoints = value; }
		}

		public List<Rectangle> CollisionRects
		{
			get { return collisionRects; }
			set { collisionRects = value; }
		}

		public string Eventstring
		{
			get 
			{
				if (eventstring == "")
					return "NULL";

				return eventstring; 
			}
			set 
			{
				if (value == "NULL" || value == null)
					eventstring = "";
				else
					eventstring = value; 
			}
		}

		public override string ToString()
		{
			return name;
		}
	}
}
